package com.changpay.zywy.ui.activity.mine
import com.changpay.zywy.R
import com.changpay.zywy.base.BaseActivity
import com.changpay.zywy.base.IView
import com.changpay.zywy.ext.showToast
import com.changpay.zywy.ext.sss
import com.changpay.zywy.http.RetrofitHelper
import kotlinx.android.synthetic.main.activity_ti_xian_message_detail.*
import kotlinx.android.synthetic.main.title_layout.*
import java.util.HashMap


class TiXianMessageDetailActivity : BaseActivity(), IView {
    override fun attachLayoutRes(): Int {
        return R.layout.activity_ti_xian_message_detail
    }

    override fun showLoading() {

    }

    override fun hideLoading() {

    }

    override fun showDefaultMsg(msg: String) {
        showToast(msg)
    }

    override fun showMsg(msg: String) {
        showToast(msg)
    }

    override fun showError(errorMsg: String) {
        showToast(errorMsg)
    }




    override fun initData() {

    }

    override fun initView() {
        tv_title.text = "账单详情"
        iv_back.setOnClickListener{finish()}
    }

    override fun start() {
         val params = HashMap<String, String>()
        params["pdc_id"] = intent.getStringExtra("pdc_id")
        params["key"] = token
        RetrofitHelper.service.pd_cash_info(params).sss(this)
        {
            tv_big_money.text = "¥${it.result.pdc_amount}"
            tv_status.text = it.result.pdc_payment_state
            tv_money.text = it.result.pdc_amount
            tv_service_charge.text = it.result.pdc_poundage
            tv_time.text = it.result.pdc_addtime
            tv_get_time.text = it.result.pdc_expect_time
            tv_bank_name.text = it.result.pdc_bank_name
            tv_charge_number.text = it.result.pdc_sn
        }

    }
}
